<template>
   <!-- {{ count}} -->
   <!-- <button  @click="add">++</button> -->
   <p>sum:{{ numArrSum }}</p>
   <a-button :icon="h(PlusCircleOutlined)" @click="handleadd">新增推进记录</a-button>
</template>

<script lang="ts" setup>
import { ref, computed,h } from 'vue'
import { PlusCircleOutlined } from '@ant-design/icons-vue';


const count = ref(0)
const numArr = ref([1, [1, 2], 3])
const add = () => {
   count.value++
};

const numArrSum = computed(() => {
   return numArr.value.flat().reduce((a, b) => a + b)
});

const handleadd = () => {
   numArr.value.push(4)
}

</script>

<style scoped></style>
